import request from '@/utils/request'

export async function appPageQuery(app, paginator) {
  return await request({
    url: '/damcAdmin/app/query',
    method: 'post',
    data: {
      'data': app,
      'paginator': paginator
    }
  })
}

export async function appSave(app) {
  return await request({
    url: '/damcAdmin/app/save',
    method: 'post',
    data: app
  })
}

export async function remoteValidateAppName(name) {
  return await request({
    url: '/damcAdmin/app/validateName/' + name,
    method: 'get',
  })
}

export async function remoteValidatesAppCode(code) {
  return await request({
    url: '/damcAdmin/app/validateCode/' + code,
    method: 'get',
  })
}
